// app.js
App({
  data: {
    nickname: '',
    avatarUrl: ''
  },
  // 获取本地存储的数据, 放到属性身上
  onLaunch() {
    //  1. 获取到本地的nickname并放到app实例的nickname属性身上
    this.nickname = wx.getStorageSync('nickname')
    //  2. 获取到本地的avatarUrl属性并放到app实例的avatarUrl属性身上
    this.avatarUrl = wx.getStorageSync('avatarUrl')
  }
})